<%@ page import="java.text.*" %>
<%@ page import="java.util.*" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<html>
<head>
    <title>申请住院</title>
    <style type="text/css">a {
        text-decoration: none
    }</style>
    <link rel="stylesheet" href="css/common.css">
</head>
<body {
      background="img/大厅.png ";
      style=" background-repeat:no-repeat ;
    background-size:100% 100%;
    background-attachment: fixed;"
      }>
<header>
    <div class="left">
        田园住院系统
    </div>
</header>
<nav>
    <ul>
        <li><a class="active" href="applyhospital.jsp">申请住院</a></li>
        <li><a href="searchMethod.jsp">查看住院资料</a></li>
        <li><a href="inspectionItem.jsp">检查项目</a></li>
        <li><a href="insertchufangdrug.jsp">处方开药</a></li>
        <li><a href="searchCharge.jsp">导出收费明细</a></li>
        <li><a href="SearchEend.jsp">出院结算</a></li>
    </ul>
</nav>
<%
    request.setCharacterEncoding("utf-8");
    SimpleDateFormat sdf = new SimpleDateFormat("YYYYMMddHHmmss");
    SimpleDateFormat sdf1 = new SimpleDateFormat("YYYY-MM-dd HH:mm:ss");
    Date date = new Date();
    String id = sdf.format(date);
    String time = sdf1.format(date);
%>
<jsp:useBean id="people" class="MyBean.patient" scope="session"/>
<form action="check.jsp" method="post">
    <table border="1" align="center">
        <tr>
            <td>住院号：</td>
            <td><input type="text" name="admissionNumber" value="<%=id%>"></td>
        </tr>
        <tr>
            <td>姓名：</td>
            <td><input type="text" name="patientName" value="<jsp:getProperty name="people" property="patientName"/>">
            </td>
        </tr>
        <tr>
            <td>性别：</td>
            <td><input type="radio" name="sex" value="男">男
                <input type="radio" name="sex" value="女">女
            </td>
        </tr>
        <tr>
            <td>年龄：</td>
            <td><input type="text" name="age" value="<jsp:getProperty name="people" property="age"/>"></td>
        </tr>
        <tr>
            <td>身份证号：</td>
            <td><input type="text" name="patientNumber"
                       value="<jsp:getProperty name="people" property="patientNumber"/>"></td>
        </tr>
        <tr>
            <td>手机号：</td>
            <td><input type="text" name="phone" value="<jsp:getProperty name="people" property="phone"/>"></td>
        </tr>
        <tr>
            <td>病床号：</td>
            <td><input type="text" name="roomno" value="<jsp:getProperty name="people" property="roomno"/>"></td>
        </tr>
        <tr>
            <td>入院时间：</td>
            <td><input type="text" name="startTime" value="<%=time%>"></td>
        </tr>
        <tr>
            <td align="center"><input type="submit" value="提交"></td>
            <td align="center"><input type="reset" value="重置"></td>
        </tr>
    </table>
    <font color="red"><%= people.getErrorMessage("ageerror") %>
    </font><br>
    <font color="red"><%= people.getErrorMessage("patientNumbererror")%>
    </font><br>
    <font color="red"><%= people.getErrorMessage("phoneerror") %>
    </font>
</form>
<br>
<hr>
<center><em><p style="background:yellow">Copyright &copy; 2020 TianYuan Web Hospital,Nuc.</em></center>
</body>
</html>